<html>
<body>
Reports type parameters that can have <code>in</code> or <code>out</code> variance.
<p>Using <code>in</code> and <code>out</code> variance provides more precise type inference in Kotlin and clearer code semantics.</p>
<p><b>Example:</b></p>
<pre><code>
  class Box&lt;T&gt;(val obj: T)

  fun consumeString(box: Box&lt;String&gt;) {}
  fun consumeCharSequence(box: Box&lt;CharSequence&gt;) {}

  fun usage(box: Box&lt;String&gt;) {
      consumeString(box)
      consumeCharSequence(box) // Compilation error
  }
</code></pre>
<p>The quick-fix adds the matching variance modifier:</p>
<pre><code>
  class Box&lt;out T&gt;(val obj: T)

  fun consumeString(box: Box&lt;String&gt;) {}
  fun consumeCharSequence(box: Box&lt;CharSequence&gt;) {}

  fun usage(box: Box&lt;String&gt;) ++{
      consumeString(box)
      consumeCharSequence(box) // OK
  }
</code></pre>
<!-- tooltip end -->
</body>
</html>
